/**
 * 系统设置路由
 */


import Main from '@/components/main'
import parentView from '@/components/parent-view'

const systemMangeRouter = {
  path: '/system-mange',
  name: 'system-mange',
  meta: {
    keepAlive: true,
    icon: '_xitongshezhi',
    title: '系统管理',
    showAlways: true,
    access: ['system-mange']
    // notCache: false
  },
  component: Main,
  children: [
    {
      path: 'account',
      name: 'account',
      meta: {
        keepAlive: true,
        title: '账号管理',
        access: ['account']
      },
      // component: () => import('@/view/system-mange/accountManage/accountManage.vue')
      component: parentView,
      children: [
        {
          path: 'employeeAccount',
          name: 'employeeAccount',
          meta: {
            keepAlive: true,
            title: '员工账号',
            access: ['EmployeeAccount']
          },
          component: () => import('@/view/system-mange/accountManage/employeeAccount.vue')
        },
        {
          path: 'customerAccount',
          name: 'customerAccount',
          meta: {
            keepAlive: true,
            title: '客户账号',
            access: ['CustomerAccount']
          },
          component: () => import('@/view/system-mange/accountManage/customerAccount.vue')
        },
        {
          path: 'supplierAccount',
          name: 'supplierAccount',
          meta: {
            keepAlive: true,
            title: '平台账号',
            access: ['SupplierAccount']
          },
          component: () => import('@/view/system-mange/accountManage/supplierAccount.vue')
        }
      ]
    },
    {
      path: 'role',
      name: 'role',
      meta: {
        keepAlive: true,
        title: '角色管理',
        access: ['role']
      },
      component: () => import('@/view/system-mange/roleManage/roleManage.vue')
    },
    {
        path: 'dataAuthority',
        name: 'dataAuthority',
        meta: {
          keepAlive: true,
          title: '数据权限管理',
          access: ['DataPermissionMng']
        },
        component: parentView,
        children: [
          {
            path: 'customerAuthority',
            name: 'customerAuthority',
            meta: {
              keepAlive: true,
              title: '客户数据权限',
              access: ['CustomerDataPermission']
            },
            component: () => import('@/view/system-mange/dataAuthority/customerAuthority/customerAuthority.vue')
          },
          {
            path: 'accountAuthority',
            name: 'accountAuthority',
            meta: {
              keepAlive: true,
              title: '账号数据权限',
              access: ['UserDataPermission']
            },
            component: () => import('@/view/system-mange/dataAuthority/accountAuthority/accountAuthority.vue')
          },
          {
            path: 'authorityGroup',
            name: 'authorityGroup',
            meta: {
              keepAlive: true,
              title: '数据权限组管理',
              access: ['DataPermissionGroup']
            },
            component: () => import('@/view/system-mange/dataAuthority/authorityGroup/authorityGroup.vue')
          }
        ]
      },
    {
      path: 'organization',
      name: 'organization',
      meta: {
        keepAlive: true,
        title: '组织管理',
        access: ['Organization']
      },
      component: parentView,
      children: [
        {
          path: 'organizationManage',
          name: 'organizationManage',
          meta: {
            keepAlive: true,
            title: '组织信息管理',
            access: ['OrgMag']
          },
          component: () => import('@/view/system-mange/organizationManage/organizationManage.vue')
        },
        {
          path: 'organizationSummary',
          name: 'organizationSummary',
          meta: {
            keepAlive: true,
            title: '组织信息汇总',
            access: ['OrgSummary']
          },
          component: () => import('@/view/system-mange/organizationManage/organizationSummary.vue')
        },
        {
          path: 'organizationHistoryAdjust',
          name: 'organizationHistoryAdjust',
          meta: {
            keepAlive: true,
            title: '历史调整信息',
            access: ['PosLogger']
          },
          component: () => import('@/view/system-mange/organizationManage/historyAdjust.vue')
        }
      ]
    },
    {
      path: 'position',
      name: 'position',
      meta: {
        keepAlive: true,
        title: '职位管理',
        access: ['Position']
      },
      component: parentView,
      children: [
        {
          path: 'positionManage',
          name: 'positionManage',
          meta: {
            keepAlive: true,
            title: '职位信息管理',
            access: ['PosMag']
          },
          component: () => import('@/view/system-mange/positionManage/positionManage.vue')
        },
        {
          path: 'positionSummary',
          name: 'positionSummary',
          meta: {
            keepAlive: true,
            title: '职位信息汇总',
            access: ['PosSummary']
          },
          component: () => import('@/view/system-mange/positionManage/positionSummary.vue')
        },
        {
          path: 'positionHistoryAdjust',
          name: 'positionHistoryAdjust',
          meta: {
            keepAlive: true,
            title: '历史调整信息',
            access: ['PosLogger']
          },
          component: () => import('@/view/system-mange/positionManage/historyAdjust.vue')
        }
      ]
    },
    {
      path: '/workflow',
      name: 'workflow',
      meta: {
        keepAlive: true,
        title: '审批流程管理',
        access: ['Process']
      },
      component: () => import('@/view/system-mange/workflow/index.vue')
    },
    {
      path: '/basicData-manage',
      name: 'basicDataType-manage',
      meta: {
        keepAlive: true,
        title: '基础数据信息管理',
        access: ['sysbasedata']
      },
      component: parentView,
      children: [
        {
          path: 'basicDataType',
          name: 'basicDataType',
          meta: {
            keepAlive: true,
            title: '基础数据类型管理',
            access: ['basicDataType']
          },
          component: () => import('@/view/system-mange/basicDataTypeManage/basicDataTypeManage.vue')
        },
        {
          path: 'basicData',
          name: 'basicData',
          meta: {
            keepAlive: true,
            title: '基础数据管理',
            access: ['basicData']
          },
          component: () => import('@/view/system-mange/basicDataManage/basicDataManage.vue')
        },
        {
          path: 'bankAccountManage',
          name: 'bankAccountManage',
          meta: {
            keepAlive: true,
            title: '银行账号管理',
            access: ['OrganizationBank']
          },
          component: () => import('@/view/system-mange/bankAccountManage/bankAccountManage.vue')
        },
        {
          path: 'taxDeclareManage',
          name: 'taxDeclareManage',
          meta: {
            keepAlive: true,
            title: '个税申报单位管理',
            access: ['DeclareUnit']
          },
          component: () => import('@/view/system-mange/taxDeclareManage/taxDeclareManage.vue')
        },
        {
          path: 'financeProduct',
          name: 'financeProduct',
          meta: {
            keepAlive: true,
            title: '产品清单',
            access: ['FinanceProduct']
          },
          component: () => import('@/view/system-mange/financeProduct/financeProduct.vue')
        },
      ]
    },
    {
      path: '/treatmentParam-manage',
      name: 'treatmentParam-manage',
      meta: {
        keepAlive: true,
        title: '待遇参数管理',
        access: ['TreatmentParameterManage']
      },
      component: parentView,
      children: [
        {
          path: 'treatmentParamType',
          name: 'treatmentParamType',
          meta: {
            keepAlive: true,
            title: '待遇类型管理',
            access: ['TreatmentBasicsType'] 
          },
          component: () => import('@/view/system-mange/treatmentParamManage/treatmentParamManage.vue')
        },
        {
          path: 'treatmentParamTypeDetail',
          name: 'treatmentParamTypeDetail',
          meta: {
            keepAlive: false,
            hideInMenu: true,
            title: '待遇类型管理-附件管理',
            access: ['TreatmentBasicsType'],
            notCache: true
          },
          component: () => import('@/view/system-mange/treatmentParamManage/treatmentParamManageDetail.vue')
        },
        {
          path: 'treatmentLink',
          name: 'treatmentLink',
          meta: {
            keepAlive: true,
            title: '待遇环节管理',
            access: ['TreatmentBasicsLink']
          },
          component: () => import('@/view/system-mange/treatmentLink/treatmentLink.vue')
        },
      ]
    },
    {
      path: 'socialsecurity',
      name: 'socialsecurity',
      meta: {
        keepAlive: true,
        title: '社保参数管理',
        access: ['socialsecurity']
      },
      component: () => import('@/view/system-mange/socialsecurity/socialsecurityManage.vue')
    },
    {
      path: 'accumulationfund',
      name: 'accumulationfund',
      meta: {
        keepAlive: true,
        title: '公积金参数管理',
        access: ['accumulationfund']
      },
      component: () => import('@/view/system-mange/accumulationfund/accumulationfundManage.vue')
    },
    {
      path: 'thirdParty',
      name: 'thirdParty',
      meta: {
        keepAlive: true,
        title: '第三方平台管理',
        access: ['ThirdPartyApplication']
      },
      component: parentView,
      children: [
        {
          path: 'thirdPartyManage',
          name: 'thirdPartyManage',
          meta: {
            keepAlive: true,
            title: '第三方授权应用',
            access: ['ThirdPartyApplication']
          },
          component: () => import('@/view/system-mange/thirdPartyManage/thirdPartyManage.vue')
        },
        {
          path: 'thirdPartyDetail',
          name: 'thirdPartyDetail',
          meta: {
            keepAlive: true,
            title: '第三方授权应用详情',
            hideInMenu: true,
            access: ['ThirdPartyApplication']
          },
          component: () => import('@/view/system-mange/thirdPartyManage/thirdPartyDetail.vue')
        }
      ]
    }
  ]
}

export default systemMangeRouter;